if(NOT KMPKG_TARGET_IS_WINDOWS)
    kmpkg_check_linkage(ONLY_STATIC_LIBRARY)
endif()

kmpkg_from_gitee(
        OUT_SOURCE_PATH SOURCE_PATH
        REPO kumo-pub/kmsql
        REF v${VERSION}
        SHA512 51a2a4bc085967c5f72e632d63b3c2c8bd0f87e0d8cd96fe6689fde4fb1d5665d0910c323cfe66a9f079870590088f0e48a6908d3b334ea028bcf42a83d16905
        HEAD_REF master
)

kmpkg_cmake_configure(
    SOURCE_PATH "${SOURCE_PATH}"
    DISABLE_PARALLEL_CONFIGURE
    OPTIONS
        -DKMCMAKE_BUILD_TEST=OFF
)


kmpkg_cmake_install()
kmpkg_cmake_config_fixup(PACKAGE_NAME kmsql CONFIG_PATH lib/cmake/kmsql)
kmpkg_fixup_pkgconfig()

kmpkg_copy_pdbs()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

kmpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
